import http from '@/request/request'

// 获取用户信息
export function getAssetList(page,size) {
    return http({
        url: `/asset/list`,
        method: 'get',
        params:{
            page:page,
            size:size
        }
    })
}

// 获取用户信息
export function getAssetTypeList() {
    return http({
        url: '/type/list',
        method: 'get',
    })
}


// 获取用户信息
export function addAssetInfo(asset) {
    return http({
        url: '/asset/add',
        method: 'post',
        data: asset,
    })
}

// 获取用户信息
export function updateAsset(asset) {
    return http({
        url: '/asset/update',
        method: 'post',
        data: asset,
    })
}


// 资产报废
export function discardApplyReq(asset) {
    return http({
        url: '/workflow/discardApply',
        method: 'post',
        data: asset,
    })
}

// 资产报修
export function repairApplyReq(asset) {
    return http({
        url: '/workflow/repairApply',
        method: 'post',
        data: asset,
    })
}

export function buyApply(asset) {
    return http({
        url: '/asset/buyApply',
        method: 'post',
        data: asset,
    })
}



export function generateQRCodeReq(asset) {
    return http({
        url: '/asset/generQR',
        method: 'post',
        data: asset,
    })
}

export function getAssetReport() {
    return http({
        url: '/asset/getDate',
        method: 'get',
    })
}


export function getAssetValueReport() {
    return http({
        url: '/asset/getValues',
        method: 'get',
    })
}
